//index.js
const app = getApp()
import api from '../../utils/api.js'
import {
  updateVolunteerActivitySpaceId,
  newUserFirstInHome,
} from '../../api/index.js'
Page({
  data: {
    typeList: [{
        id: 0,
        name: '全部'
      }, {
        id: 1,
        name: '销售|市场'
      },
      {
        id: 2,
        name: '采购|客服'
      },
      {
        id: 3,
        name: '餐饮|零售'
      },
      {
        id: 4,
        name: '通信|开发'
      },
    ],
    typeId: 0,
    recommendList: [{}, {}, {}]
  },
  // 详情
  takeOrdersGo() {
    wx.navigateTo({
      url: '/pages/takeOrders/takeOrders'
    })
  },
  onLoad(option) {

  },
  onShow() {},
  // 扫一扫功能（测试用）
  collectImg() {
    // 不是正式环境下可用
    if (app.globalData.host != 'https://api.zuji365.cn') {
      wx.scanCode({
        success(res) {
          wx.reLaunch({
            url: '/' + res.path
          })
        }
      })
    }
  },
  cutType(e) {
    console.log('e', e)
    this.setData({
      typeId: e.currentTarget.dataset.id
    })
  }
})